package com.kefu.robot.vo;

import org.apache.commons.lang3.StringUtils;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.kefu.common.vo.AbstractSearchVo;
import com.kefu.robot.model.RobotDocNodeItemQuestion;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author xiaoyu
 * @date 2023/02/24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "多轮问题节点item相似问题")
public class RobotDocNodeItemQuestionSearchVo extends AbstractSearchVo {

    @ApiModelProperty(value = "标准问题id")
    private String itemId;
    @ApiModelProperty(value = "问题内容")
    private String question;

	 @Override
    public  LambdaQueryWrapper<RobotDocNodeItemQuestion> lambdaQuery(){
    	LambdaQueryWrapper<RobotDocNodeItemQuestion> wrapper=Wrappers.<RobotDocNodeItemQuestion>lambdaQuery();
	    wrapper.eq(StringUtils.isNotBlank(itemId), RobotDocNodeItemQuestion::getItemId, itemId);
	    wrapper.like(StringUtils.isNotBlank(question), RobotDocNodeItemQuestion::getQuestion, question);
    	return wrapper;
	}
}